﻿package com.tudou.newPlayer
{

    public class VideoStatus extends Object
    {
        private var $status:int = 0;
        private var $lastStatus:int = 0;
        public static const READY:int = 3;
        public static const ERROR:int = -1;
        public static const BUFFERING:int = 6;
        public static const STOPPED:int = 8;
        public static const PLAYING:int = 4;
        public static const INITED:int = 0;
        public static const COMPLETED:int = 7;
        public static const PAUSED:int = 5;
        public static const LOADING:int = 1;
        public static const LOAD_TO_PLAY:int = 2;

        public function VideoStatus()
        {
            return;
        }// end function

        public function get status() : int
        {
            return $status;
        }// end function

        public function set status(param1:int) : void
        {
            if (param1 == $status)
            {
                return;
            }
            $lastStatus = $status;
            $status = param1;
            return;
        }// end function

        public function toString() : String
        {
            var _loc_1:Array = ["INITED", "LOADING", "LOAD_TO_PLAY", "READY", "PLAYING", "PAUSED", "BUFFERING", "COMPLETED", "STOPPED"];
            _loc_1["-1"] = "ERROR";
            return _loc_1[status];
        }// end function

        public function get lastStatus() : int
        {
            return $lastStatus;
        }// end function

    }
}
